#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/unistd.h>

char message[] = "hello world!!!\n";
char buffer[2];

int main()
{	
	struct sockaddr_in address;
	int socket_handle;
	int ss;
	socket_handle = socket(AF_INET, SOCK_STREAM, 0);
	
	address.sin_family = AF_INET;
	address.sin_port = htons(3000);
	address.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
	connect(socket_handle, (struct sockaddr *) &address, sizeof(address));
	
//	while (true)
	{
		ss = send (socket_handle, &message, 2, sizeof(message));
//		if (ss < 0) break;
	}
		
	close(socket_handle);
	return 0;
}
